#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define D long double
bool a[50005],guan=0;
signed main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	freopen("neck.in","r",stdin);freopen("neck.out","w",stdout);
	string s,t;
	cin>>s>>t;
	int ya=0;
	for(int i=t.size()-1;i<s.size();++i){
		guan=0;
		if(s[i]==t[t.size()-1]){
			for(int j=i-t.size()+1;j<=i;++j){
				if(s[j]!=t[j-i+t.size()-1]){
					guan=1;
					break;
				}
			}
			if(guan==0){
				ya++;
			}
		}
	}
	cout<<s.size()-ya;
	return 0;
}
